package org.mashart.pink.m.ws;

/**
 * Interface similar to <code>DeviceConnector</code>.
 * Any GPS coordinates status transmitter should implement this.
 *
 * We have the only implementation for the moment
 * @see RestfulClient
 */
public interface WsConnector {
    /**
     * Called when settings are changed or right after
     * implementing class instantiation.
     *
     * Cannot be called after <code>initialize()</code>
     */
    public int configure();
    /* TODO add arguments to reconfigure the client, e.g.
     *      POST url, parameters format, etc. */

    /**
     * Establishes connection with the server, if needed
     */
    public int initialize();

    /**
     * Send GPS coordinates updates to the server
     */
//    public int push(Waypoint wp);

    /**
     * Send bytes to the server
     */
    public int push(byte[] b);

    /**
     * Called back on exit... or pause?
     */
    public int terminate();
}

